import firebase from 'firebase/app';
import 'firebase/auth';
import 'firebase/firestore';
import 'firebase/storage';

const firebaseConfig = {
  apiKey: 'AIzaSyA6e__mtzHokT6AoxaHEdQaUqj2c6A6d1w',
  authDomain: 'vue-music-7c038.firebaseapp.com',
  projectId: 'vue-music-7c038',
  storageBucket: 'vue-music-7c038.appspot.com',
  messagingSenderId: '79011467139',
  appId: '1:79011467139:web:41b289cdf7286173bf30b6',
};

// Initialize Firebase
firebase.initializeApp(firebaseConfig);

const auth = firebase.auth();
const db = firebase.firestore();
const storage = firebase.storage();

const usersCollection = db.collection('users');
const songsCollection = db.collection('songs');
const commentsCollection = db.collection('comments');

export {
  auth,
  db,
  usersCollection,
  songsCollection,
  commentsCollection,
  storage,
};
